//Ta Duc Viet
//Loai bo ki tu lap trong xau
#include <iostream>
#include <string>
using namespace std;

void no_repetitions( char []);// In ra chuoi khong chua ki tu lap
char arr_char[100];
int sl = 0;
bool check_char( char);
int main(){
    char str[100];
    cout << "Type in a string: ";
    cin.getline(str,100);
    cout << "The string without repetitions is: ";
    no_repetitions( str);
    system("pause");
    return 0;
}
bool check_char( char s){
    for ( int  i = 0; i < sl; i++){
        if ( s == arr_char[i]) return false;
    }
    arr_char[sl] = s;
    sl++;
    return true;
}
void no_repetitions( char str[]){
    for ( int i = 0; i < strlen(str); i++){
        if ( check_char( str[i])) cout << str[i];
    }
    cout << endl;
}
